package com.shadow.cloud.dap7.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 数据字典.
 */
@Data
@TableName("dictionary_dictionary")
public class Dictionary implements Serializable {

    private static final long serialVersionUID = 5316267272941017419L;

    /**
     * 主键序列ID.
     **/
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    /**
     * 创建时间.
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间.
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifyTime;

    /**
     * 字典值.
     **/
    private String dictValue;

    /**
     * 字典名称.
     **/
    private String dictName;

    /**
     * 上级编码.
     **/
    private String parentId;

    /**
     * parentId下显示序号.
     **/
    private Integer orders;
    /**
     * 描述.
     **/
    private String description;

    /**
     * 查询属性.
     **/
    @TableField(exist = false)
    private String search;
    /**
     * 上级字典名称：前端显示属性.
     **/
    @TableField(exist = false)
    private String parentName;
}
